<template>
    <div class="box">
        <div v-if="$myRoute.meta.is_header" class="header">
            <van-search @click="$myRouter.push('/sousuo')" placeholder="请输入搜索关键词" />
        </div>
        <div class="center">
            <router-view></router-view>
        </div>
        <div v-if="$myRoute.meta.is_footer" class="footer">
            <van-tabbar>
                <van-tabbar-item to="/home" name="home" icon="home-o">首页</van-tabbar-item>
                <van-tabbar-item to="/zhuanti" name="zhuanti" icon="search">专题</van-tabbar-item>
                <van-tabbar-item to="/fenlei" name="fenlei" icon="friends-o">分类</van-tabbar-item>
                <van-tabbar-item to="/gouwu" name="gouwu" icon="setting-o">购物</van-tabbar-item>
                <van-tabbar-item to="/wode" name="wode" icon="setting-o">我的</van-tabbar-item>
            </van-tabbar>
        </div>
    </div>
</template>
<script name="fhdApp" setup lang="ts">
import { useRoute } from 'vue-router';
import { useRouter } from 'vue-router'
const $myRouter = useRouter()
const $myRoute = useRoute()
</script>

<style scoped lang="scss">
.box{
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;

}
    .header{
        height: 50px;
        background-color: red;
    }
    .center{
        overflow: auto;
        flex: 1;
    }
    .footer{
        height: 50px;
        background-color: green;
    }
</style>
